package xd.ylwy.student.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;
import xd.ylwy.course.service.impl.TbCourseServiceImpl;
import xd.ylwy.student.entity.TbStudent;
import xd.ylwy.student.mapper.TbStudentMapper;
import xd.ylwy.student.service.impl.TbStudentServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author xd
 * @since 2022-09-23
 */
@RestController
@RequestMapping("/tbStudent")
public class TbStudentController {
    @Autowired
    private TbStudentServiceImpl tbStudentService;

    @GetMapping("/findAll")
    public List<Map<String, Object>> findAll() {
        return tbStudentService.findAll();
    }
    @GetMapping("/grade")
    public List<Map<String, Object>> findGrade() {
        return tbStudentService.findGrade();
    }
    @GetMapping("/sex")
    public List<Map<String, Object>> findSex() {
        return tbStudentService.findSex();
    }
    @GetMapping("/faculty")
    public List<Map<String, Object>> findFaculty() {
        return tbStudentService.findFaculty();
    }

    @PostMapping("/likeFind")
    public List<TbStudent> likeFind(String student){
        return tbStudentService.likeFind(student);
    }



}

